package com.yanftch.hdc_tools.common;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {
    public static String format(long timestamp) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        // 将时间戳转换为日期
        Date date = new Date(timestamp);
        String formattedDate = sdf.format(date);
        return formattedDate;
    }
}
